<template>
    <div>
        <div style="border:1px solid #BFBFBF;padding: 10px;background-color: white">
            <template>
                <el-tabs v-model="activeName2" type="card" >
                    <el-tab-pane label="维修主控台" name="first">
                        <div style="margin-top: 10px;height: 100%;">
                            <div >
                                <!--待检测-->
                                <div style="width: 45.6%;display: inline-block;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">待检测</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="daiJianCe" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" prop="gdLsh" label="工单号">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用"  prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>

                                <!--待与客户确认-->
                                <div style="width: 45.6%;display: inline-block;margin-left: 5%;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">待与客户确认</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="daiYvKeHuQueRen" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="190px" prop="gdLsh" label="工单号">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>

                                <!--待维修-->
                                <div style="width: 45.6%;display: inline-block;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">待维修</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="daiWeiXiu" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" prop="gdLsh" label="工单号">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期">
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>

                                <!--维修中-->
                                <div style="width: 45.6%;display: inline-block;margin-left: 5%;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">维修中</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="weiXiuZhong" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" label="工单号" prop="gdLsh" >
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>

                                <!--修理完成-->
                                <div style="width: 45.6%;display: inline-block;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">修理完成</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="xiuLiWanCheng" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" label="工单号" prop="gdLsh">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>
                                <div style="width: 45.6%;display: inline-block;margin-left: 5%;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">待交付</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="daiJiaoFu" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" label="工单号" prop="gdLsh">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>
                                <div style="width: 45.6%;display: inline-block;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">已交付</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="yiJiaoFu" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" label="工单号" prop="gdLsh">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>
                                <div style="width: 45.6%;display: inline-block;margin-left: 5%;">
                                    <el-col  style="height: 37px;background-color: #f4f9fc;"><span style="line-height: 37px;font-size: 13px">已完成</span></el-col>
                                    <div style="width: 100%;" >
                                        <el-table height="177px" :data="yiWanCheng" :header-cell-style="{height:'44px',padding:'0px'}">
                                            <el-table-column width="180px" label="工单号" prop="gdLsh">
                                                <template slot-scope="p">
                                                    <a v-html="p.row.gdLsh" @click="chakan(p.row)" style="color: blue"></a>
                                                </template>
                                            </el-table-column>
                                            <el-table-column label="费用" prop="gdxbId[0].gdMoney"></el-table-column>
                                            <el-table-column label="日期" >
                                                <template slot-scope="d">
                                                    {{d.row.gd_Jiedanrq | formatDate}}
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="工单列表" name="second">
                        <!--最大div-->
                        <div style="margin-top: -10px">
                            <!--新建栏-->
                            <div style="border:1px solid #BFBFBF;padding: 10px;background-color: white;margin-top: 10px;height: 40px">
                                <el-row :gutter="24">
                                    <el-col :span="2">
                                        <span style="font-size: 18px;line-height:40px;margin-left: 5px">维修工单</span>
                                    </el-col>
                                    <el-col :span="7">
                                        <el-date-picker
                                                v-model="shijian"
                                                style="width: 200px"
                                                type="date"
                                                value-format="yyyy-MM-dd" format="yyyy-MM-dd"
                                                @change="changebusni"
                                                placeholder="选择日期时间">
                                        </el-date-picker>
                                        <el-button style="background-color: #F05050;color: white;margin-left: 10px;" @click="cancelseek" icon="el-icon-back" v-show="seek" size="mini" round>解除搜索</el-button>
                                    </el-col>
                                    <el-col :span="9">
                                        <el-input placeholder="工单流水账号" v-model="lsh" @keyup.enter.native="ajaxLoginApi()" style="width: 250px;">
                                            <i slot="suffix" class="el-input__icon el-icon-search"></i>
                                        </el-input>
                                    </el-col>
                                    <el-col :span="6">
                                        <router-link :to="{path:'/wxgdtk'}">
                                            <el-button size="small"  type="primary" >新建维修工单</el-button>
                                        </router-link>
                                    </el-col>
                                </el-row>
                            </div>



                            <!--表格数据框-->
                            <div style="margin-top: 10px;border: 1px solid #BFBFBF;background-color: white">
                                <div style="width: 100%;height: 40px;background-color: white;border-bottom: 1px solid #EBEEF5">
                                    <div class="operate" v-show="cjy">
                                        <div class="selected—title" style="border-right: 0px ;width: 100%;">
                                            时间：<span>{{shijian}}</span>
                                        </div>
                                    </div>
                                    <div class="operate" v-show="cje">
                                        <div class="selected—title" >
                                            已选中<span class="selected—count">{{count}}</span>项
                                        </div>
                                        <div  class="selected—title2" v-show="isOne">
                                            <span @click="isAddRecord=true"><i class="el-icon-circle-plus-outline"></i>添加跟进记录</span>
                                        </div>
                                        <div  class="selected—title1" v-show="isOne">
                                            <span><i class="el-icon-edit"></i>修改</span>
                                        </div>
                                        <div  class="selected—title1">
                                            <span><i class="el-icon-delete"></i>删除</span>
                                        </div>
                                    </div>
                                </div>
                                <el-table
                                        :data="wxgdlist"
                                        style="width: 100%"
                                        max-height="450"
                                        :default-sort = "{prop: 'date', order: 'descending'}"
                                        @selection-change="handleSelectionChange">
                                    <el-table-column
                                            type="selection"
                                            width="50"
                                            align="center">
                                    </el-table-column>
                                    <el-table-column
                                            fixed
                                            prop="gdId"
                                            label="ID"
                                            sortable
                                            align="center"
                                            width="60">
                                    </el-table-column>
                                    <el-table-column
                                            prop="gdLsh"
                                            label="工单号"
                                            sortable
                                            align="center"
                                            width="180">
                                    </el-table-column>
                                    <el-table-column
                                            fixed
                                            label="日期"
                                            align="center"
                                            width="150">
                                        <template slot-scope="d">
                                            {{d.row.gd_Jiedanrq | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="clientId.clientName"
                                            label="对应客户"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="gdxbId[0].gdMoney"
                                            label="费用"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="gdxbId[0].gdYishoumoney"
                                            label="已收款"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="gdZhuangtai"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="empId.empName"
                                            label="接单人"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            fixed="right"
                                            label="操作"
                                            align="center"
                                    >
                                        <template v-slot="d">
                                            <!--如果是三个标签，后两个标签padding-left: 10px;-->
                                            <i style="font-size:18px;color: #409EFF" @click="xiugai(d.row)" class="el-icon-edit"></i>

                                            <i style="font-size:18px;padding-left: 20px;color: #409EFF" @click="shanchu(d.row)" class="el-icon-delete"></i>
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </div>


                            <!--分页框-->
                            <div style="margin-top: 15px;border: 1px solid #BFBFBF;padding: 10px;background-color: white">
                                <div style="text-align: center">
                                    <el-pagination
                                            @size-change="handleSizeChange"
                                            @current-change="handleCurrentChange"
                                            :current-page.sync="currentPage"
                                            :page-sizes="sizes"
                                            :page-size="pageSize"
                                            layout="total, sizes, prev, pager, next, jumper"
                                            :total="totalSize"
                                    >
                                    </el-pagination>
                                </div>
                            </div>


<!--                            &lt;!&ndash;统计图&ndash;&gt;-->
<!--                            <div style="margin-top: 15px;border: 1px solid #BFBFBF;padding: 10px;background-color: white">-->
<!--                                <div style="text-align: center">-->
<!--                                    <el-row :gutter="20">-->
<!--                                        <el-col :span="8">-->
<!--                                            <span style="font-weight: 600; margin-left: 20px">分布</span>-->
<!--                                            <div id="echartsDemo" style="width: 350px;height: 330px;margin-top: 10px">-->
<!--                                            </div>-->
<!--                                            <el-select v-model="fengbu" placeholder="全部数据" style="width: 250px;height: 45px;margin-left: -46px;margin-top: -90px">-->
<!--                                                <el-option-->
<!--                                                        v-for="item in fengbus"-->
<!--                                                        :key="item.value"-->
<!--                                                        :label="item.label"-->
<!--                                                        :value="item.value">-->
<!--                                                </el-option>-->
<!--                                            </el-select>-->
<!--                                        </el-col>-->
<!--                                        <el-col :span="8">-->
<!--                                            <span style="font-weight: 600; margin-left: 20px">Top</span>-->
<!--                                            <div id="echartsBarDemo" style="width: 350px;height: 330px;margin-top: 10px;margin-left: -10px"></div>-->
<!--                                            <el-select v-model="top" placeholder="全部数据" style="width: 250px;height: 45px;margin-left: -60px;margin-top: -90px">-->
<!--                                                <el-option-->
<!--                                                        v-for="item in tops"-->
<!--                                                        :key="item.value"-->
<!--                                                        :label="item.label"-->
<!--                                                        :value="item.value">-->
<!--                                                </el-option>-->
<!--                                            </el-select>-->
<!--                                        </el-col>-->
<!--                                        <el-col :span="8">-->
<!--                                            <span style="font-weight: 600; margin-left: 20px">工具</span>-->
<!--                                            <div id="echartsBarDemo1" style="width: 350px;height: 330px;margin-top: 10px;margin-left: -10px"></div>-->
<!--                                            <el-select v-model="gongju" placeholder="全部数据" style="width: 250px;height: 45px;margin-left: -46px;margin-top: -90px">-->
<!--                                                <el-option-->
<!--                                                        v-for="item in gongjus"-->
<!--                                                        :key="item.value"-->
<!--                                                        :label="item.label"-->
<!--                                                        :value="item.value">-->
<!--                                                </el-option>-->
<!--                                            </el-select>-->
<!--                                        </el-col>-->
<!--                                    </el-row>-->
<!--                                </div>-->
<!--                            </div>-->


                        </div>
                    </el-tab-pane>
                </el-tabs>
            </template>
        </div>
    </div>

</template>
<script>
    import {formatTimeToStr} from '../router//format.js'
    export default {
        name: "Lwxgd",
        data() {
            return {
                fengbu:'维修人员月度工单费用分布',
                fengbus:[{
                    value: '维修人员月度工单费用分布',
                    label: '维修人员月度工单费用分布'
                }, {
                    value: '保修状况月度工单数分布',
                    label: '保修状况月度工单数分布'
                }, {
                    value: '维修产品月度工单费用分布',
                    label: '维修产品月度工单费用分布'
                }],
                top:'维修部门月度工单数分布',
                tops:[{
                    value: '维修部门月度工单数分布',
                    label: '维修部门月度工单数分布'
                }, {
                    value: '维修部门月度工单费用分布',
                    label: '维修部门月度工单费用分布'
                }, {
                    value: '维修人员月度工单数分布',
                    label: '维修人员月度工单数分布'
                }],
                gongju:'保修状况月度工单费用分布',
                gongjus:[{
                    value: '保修状况月度工单费用分布',
                    label: '保修状况月度工单费用分布'
                }, {
                    value: '维修产品月度工单数分布',
                    label: '维修产品月度工单数分布'
                }],
                activeName2: 'first',
                multipleTable: [],//存放选中值的数组
                isOne:true,//选中项为1就出现添加跟进记录和修改
                //解除搜索是否显示
                seek:false,
                //下拉选择框
                options3: [{
                    label: '热门城市',
                    options: [{
                        value: '上海',
                        label: '上海'
                    }, {
                        value: '北京测试',
                        label: '北京'
                    }]
                }, {
                    label: '城市名',
                    options: [{
                        value: '成都成都',
                        label: '成都'
                    }, {
                        value: '深圳深圳',
                        label: '深圳'
                    }, {
                        value: '广州广州',
                        label: '广州'
                    }, {
                        value: '大连大连',
                        label: '大连'
                    }]
                }],
                shijian: '',
                lsh:'',
                //场景一
                cjy:true,
                //场景二
                cje:false,
                //搜索框
                //表格
                wxgdlist: [],
                //分页
                totalSize:10,
                pageSize:5,
                currentPage:1,
                sizes:[5, 10, 15, 20],

                //维修工单主控台
                daiJianCe: [],//待检测
                daiYvKeHuQueRen: [],//待与客户确认
                daiWeiXiu: [],//待维修
                weiXiuZhong: [],//维修中
                xiuLiWanCheng: [],//修理完成
                daiJiaoFu: [],//待交付
                yiJiaoFu: [],//已交付
                yiWanCheng: [],//已完成
            }
        },
        created:function() {
            //调用分页
            this.initData(this.currentPage,this.pageSize);

            this.selectdaiJianCe();
            this.selectdaiYvKeHuQueRen();
            this.selectdaiWeiXiu();
            this.selectweiXiuZhong();
            this.selectxiuLiWanCheng();
            this.selectdaiJiaoFu();
            this.selectyiJiaoFu();
            this.selectyiWanCheng();
        },
        mounted () {
            this.drawLine()
            this.drawBar()
            this.dddf()

        },methods: {

            xiugai(d){
                this.$router.push({
                    path:'/wxgdtk',
                    query: {key1:d}
                });
            },
            shanchu(d){
                window.console.log(d)
                // this.addwxgclist.gdLuojisc=0;
                this.$confirm('是否确定删除?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    d.xsfyZhuangtai=0
                    this.$axios.post("http://localhost:8088/vue/addwxzcb",d)
                        .then(()=>{
                            this.$message({
                                showClose: true,
                                type: 'success',
                                message: '删除成功!',
                            });
                        }).catch(()=>{
                            this.$message({
                                showClose: true,
                                message: '删除失败',
                                type: 'error'
                            });
                        }
                    )
                }).catch(() => {
                    this.$message({
                        showClose: true,
                        type: 'info',
                        message: '已取消删除'
                    });
                });
            },
            chakan(tab){
                this.$router.push({
                    path:'/wxgdtk',
                    query: {key:tab}
                });
            },


            //维修工单主控台=============
            //待检测
            selectdaiJianCe(){
                this.$axios.post("http://localhost:8088/vue/selectdaiJianCe")
                    .then(v=>{
                        this.daiJianCe = v.data;
                    })
                    .catch()
            },

            //待与客户确认
            selectdaiYvKeHuQueRen(){
                this.$axios.post("http://localhost:8088/vue/selectdaiYvKeHuQueRen")
                    .then(v=>{
                        this.daiYvKeHuQueRen = v.data;
                    })
                    .catch()
            },

            //待维修
            selectdaiWeiXiu(){
                this.$axios.post("http://localhost:8088/vue/selectdaiWeiXiu")
                    .then(v=>{
                        this.daiWeiXiu = v.data;
                    })
                    .catch()
            },

            //维修中
            selectweiXiuZhong(){
                this.$axios.post("http://localhost:8088/vue/selectweiXiuZhong")
                    .then(v=>{
                        this.weiXiuZhong = v.data;
                    })
                    .catch()
            },

            //修理完成
            selectxiuLiWanCheng(){
                this.$axios.post("http://localhost:8088/vue/selectxiuLiWanCheng")
                    .then(v=>{
                        this.xiuLiWanCheng = v.data;
                    })
                    .catch()
            },

            //待交付
            selectdaiJiaoFu(){
                this.$axios.post("http://localhost:8088/vue/selectdaiJiaoFu")
                    .then(v=>{
                        this.daiJiaoFu = v.data;
                    })
                    .catch()
            },

            //已交付
            selectyiJiaoFu(){
                this.$axios.post("http://localhost:8088/vue/selectyiJiaoFu")
                    .then(v=>{
                        this.yiJiaoFu = v.data;
                    })
                    .catch()
            },

            //已完成
            selectyiWanCheng(){
                this.$axios.post("http://localhost:8088/vue/selectyiWanCheng")
                    .then(v=>{
                        this.yiWanCheng = v.data;
                    })
                    .catch()
            },

            //分页
            initData(currentPage,pageSize,shijian,lsh){
                this.$axios.get("http://localhost:8088/vue/wxzbcx",{params:{currentPage:currentPage,pageSize:pageSize,shijian:shijian,lsh:lsh}}).then(v=>{
                    this.wxgdlist=v.data.row;
                    this.totalSize=v.data.total;
                }).catch();
            },
            //回车查询
            ajaxLoginApi(){
                this.initData(this.currentPage,this.pageSize,this.shijian,this.lsh);
            },

            /*跳转详情方法*/
            todetails(rows){
                this.$router.push({
                    path:'/business/details',
                    query: {
                        row:rows
                    }

                })
            },
            /*新建商机方法*/
            showmian(){

            },
            /*表格删除方法*/
            deleteRow(index, rows) {
                rows.splice(index, 1);
            },
            /*分页数方法*/
            handleSizeChange(val) {
                this.initData(1,this.pageSize=val);
                // window.console.log(`每页 ${val} 条`);
            },
            /*当前页方法*/
            handleCurrentChange(page) {
                this.initData(page,this.pageSize);
                // window.console.log(`当前页: ${page}`);
            },
            //复选框选中的
            handleSelectionChange(val) {
                this.multipleTable = val;//  this.multipleTable 选中的值
                if(this.multipleTable.length>0){
                    this.cjy=false;//第一行隐藏
                    this.cje=true;//批量操作栏出现
                }
                //选中项大于1不能执行添加跟进记录和修改按钮
                if(this.multipleTable.length>1){
                    this.isOne=false;
                }else if(this.multipleTable.length==0){//选中项为0时
                    this.cjy=true;//第一行出现
                    this.cje=false;//批量操作栏隐藏
                }else{
                    this.isOne=true;//添加跟进记录和修改出现
                }
                window.console.log(val);
            },
            /*选择类型商机方法*/
            changebusni(){
                if(this.shijian!=''){
                    this.seek=true;
                    this.initData(this.currentPage,this.pageSize,this.shijian,this.lsh);
                }
            },
            /*解除选择类型商机方法*/
            cancelseek(){
                this.shijian='';
                this.seek=false;
                this.initData(this.currentPage,this.pageSize,this.lsh);
            },


            //统计图
            drawLine () {
                let elementById = document.getElementById('echartsDemo')
                let echartsDemo = this.$echarts.init(elementById)

                let option = {
                    tooltip: {
                        trigger: 'item',
                        formatter: '{a} <br/>{b}: {c} ({d}%)'
                    },
                    legend: {
                        orient: 'vertical',
                        left: 10,
                        data: []
                    },
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            radius: ['0%', '75%'],
                            avoidLabelOverlap: false,
                            label: {
                                normal: {
                                    show: false,
                                    position: 'center'
                                },
                                emphasis: {
                                    show: true,
                                    textStyle: {
                                        fontSize: '30',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            labelLine: {
                                normal: {
                                    show: false
                                }
                            },
                            data: [
                                {value: 335, name: 'uu'},
                                {value: 310, name: '邮件营销'},
                                {value: 234, name: '联盟广告'},
                                {value: 135, name: '视频广告'},
                                {value: 1548, name: '搜索引擎'}
                            ]
                        }
                    ]
                }
                echartsDemo.setOption(option)

            },
            drawBar () {
                let echartsBarDemo = this.$echarts.init(document.getElementById('echartsBarDemo'))

                echartsBarDemo.setOption({
                    color: ['#3398DB'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                        }
                    },
                    grid: {
                        left: '6%',
                        right: '3%',
                        bottom: '10%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
                            axisTick: {
                                alignWithLabel: true
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value'
                        }
                    ],
                    series: [
                        {
                            name: '直接访问',
                            type: 'bar',
                            barWidth: '60%',
                            data: [10, 52, 200, 334, 390, 330, 220]
                        }
                    ]
                })
            },
            dddf(){
                let echartsBarDemo1 = this.$echarts.init(document.getElementById('echartsBarDemo1'))
                echartsBarDemo1.setOption({
                    grid: {
                        left: '6%',
                        right: '3%',
                        bottom: '10%',
                        containLabel: true
                    },
                    xAxis: {
                        type: 'category',
                        boundaryGap: false,
                        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [{
                        data: [820, 932, 901, 934, 1290, 1330, 1320],
                        type: 'line',
                        areaStyle: {}
                    }]
                })

            }
        },
        computed:{
            count(){
                return this.multipleTable.length
            }
        },
        filters: {
            formatDate: function(time) {
                if(time!=null&&time!="")
                {
                    var date = new Date(time);
                    return formatTimeToStr(date, "yyyy-MM-dd ");
                }else{
                    return "";
                }
            }
        }

    }
</script>
<style scoped>

    .addview:hover{
        color: white;
    }
    a{
        text-decoration: none;
        color: #409EFF;
    }
    a:hover{
        color: white;
    }
    .busin:hover{
        color: #3E84E9;
        cursor:pointer;
    }
    .businame{
        color: #606266;
    }
    .businame:hover{
        color: #409EFF;
        cursor:pointer;
    }
    .operate{
        font-size: 12px;
        height: 40px;
        padding: 0 20px;
        color: #777;
        background: white;
    }
    .selected—title{
        margin-top: 15px;
        margin-left: -6px;
        border-right: 1px solid #e6e6e6;
        width: 86px;
        height:20px;
        float: left;
    }
    .selected—title1{
        margin-top: 15px;
        border-right: 1px solid #e6e6e6;
        width: 86px;
        height:20px;
        float: left;
        cursor: pointer;
    }

    .selected—title1 span{
        margin-left: 24px;
    }
    .selected—title1 span:hover{
        color:#409eff;
    }
    .selected—title2{
        margin-top: 15px;
        border-right: 1px solid #e6e6e6;
        width: 129px;
        height:20px;
        float: left;
        cursor: pointer;
    }

    .selected—title2 span{
        margin-left: 24px;
    }
    .selected—title2 span:hover{
        color:#409eff;
    }
</style>